#ifndef _UNDIRECTED_GRAPH_
#define _UNDIRECTED_GRAPH_

#include <stdlib.h>
#include "fibonacci-heap.h"
#define INF 214748364

struct Edge {
  int dest;
  struct Edge *next;
  double cost;
};

struct UGraph {
  struct Edge *v[1001];
  struct Edge *end[1001];
  int used[1001];
  int size;
};

typedef struct Edge Edge;
typedef struct UGraph UGraph;


UGraph *newUGraph();
Edge *newEdge(int x, int y, double cost);
void addEdge(UGraph *ug, int x, int y, double cost);
void dijkstra(UGraph *ug, int source, double *result);

#endif
